package com.example.sfm.pojo.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author sfm
 * @since 2025-03-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("grades")
@Schema(name="Grades对象",description = "学生成绩表")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Grades implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "成绩ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "学生ID")
    private Integer studentId;

    @Schema(description = "课程ID")
    private Integer courseId;

    @Schema(description = "成绩")
    private BigDecimal score;

    @Schema(description = "成绩等级（0=不及格, 1=及格, 2=良好, 3=优秀）")
    private Integer grade;

    @Schema(description = "考试日期")
    private LocalDate examDate;

    @Schema(description = "成绩备注")
    private String remark;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;


}
